export default {
    closeDialog() {
        this.resetForm();
        this.$emit('update:show', false);
    },
    resetForm() {
        this.$refs['editFormRef'].resetFields();
        this.formData = JSON.parse(JSON.stringify(this.defaultData));
    },
    onSubmit() {
        this.$refs['editFormRef'].validate((valid) => {
            if (valid) {
                this.$emit('onSubmit', this.formData);
            } else {
                console.log('error submit!!');
                return false;
            }
        });
    },

}